/*
 * 版权所有 ( c ) wingare.gary 2011-2011 保留所有权利。
 * 项目：	Lenovo Push Service
 * 文件名：	SysConsistant.java
 * 版本:    1.0
 * 描述：	常量定义
 * 作者：	韩小勇
 * 日期：	2011-10-28 
 * 修改历史：
 * 【时间】		【修改者】	【修改内容】
 */
package cn.wingware.config;
import java.io.File;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.support.AbstractLobStreamingResultSetExtractor;
import org.springframework.jdbc.support.lob.OracleLobHandler;

import cn.wingware.util.CommonUtils;

public class SysInfoInit extends CommonUtils {
	
	private static final Log log = LogFactory.getLog(SysInfoInit.class);
	
	private JdbcTemplate jdbcT =(JdbcTemplate)SpringUtils.newInstants().getBean("jdbcTemplate");	
	
	//############# Syst
	/**获取昵称相对Url*/
	private static String AMS_USS_NICKNAME_PATH;
	private static String AMS_USS_NICKNAME_PATH_V2;
	
	/**用户下载App文件相对URL*/
	public static String AMS_DOWN_APPFILE_PATH_V3;
	
	/**查询用户在线状态相对URL*/
	//#############init from ams properties file begin
	/**AMS FILE SERVER*/
	public static String AMS_FILE_SERVER;
	/**AMS SERVER*/
	public static String AMS_SERVERS_PUBLIC;
	/**USS SERVER*/
	private static String AMS_USS_SERVER;
	/**BILLING SERVER*/
	public static String AMS_BILLING_SERVER;
	/**PAY SERVER*/
	public static String AMS_PAY_SERVER;
	/**PSB SERVER*/
	//注册服务信息 begin
	/**分配给Ams子系统的ServerID*/
	public static final String AMS_APP_SID = "rapp001";
	//public static String AMS_PSB_SERVICE_ACK;
	public static String AMS_PSB_SERVICE_ADDRESS;
	public static String AMS_PSB_SERVICE_ALTERADDRESS;
	public static String AMS_PSB_SERVICE_NOTIFY;
	public static String AMS_PSB_SERVICE_SET;
	//注册服务信息 end
	
	//搜索服务接口
	/**搜索接口服务url*/
	public static String AMS_SEARCH_URL;
	/**搜索索引更新*/
	public static String AMS_INDEXUPDATE_URL = "http://www.baidu.com";
	//搜索服务接口 end
	/** 文件上传根路径*/
	public static String AMS_APP_UPLOAD_ROOTPATH;
	/**	文件下载或图片查看的根网路路径*/
	public static String AMS_APP_DOWN_ROOT_PATH;
	/**	文件下载或图片查看的根网路路径*/
	public static String AMS_APP_DOWN_ROOTPATH;
	/**应用程序背景图片上传路径 */
	public static String AMS_APP_UPLOAD_BG;
	/**应用程序快照图片上传路径 */
	public static String AMS_APP_UPLOAD_SNAP;	
	/**应用程序文 件上传路径 */
	public static String AMS_APP_UPLOAD_JAR;	
	/**应用程序图片上传路径 */
	public static String AMS_APP_UPLOAD_ICON;
	/**文件缓冲区*/
	public static String AMS_APP_FILECACHE;
	
	/**设置Cookie有效期*/
	public static int AMS_COOKIE_MAXAGE;
	/**推荐消息有效时间*/
	public static int AMS_RECOMMEND_PMSGTTL;
	/**设置页面显示记录数*/
	public static int AMS_LIST_PAGESIZE;
	
	/**AuthCode=0允许下载的最大次数 付费应用*/
	public static int AMS_MAX_DOWNlOAD;
	/**AuthCode=1允许安装的最大次数 付费应用*/
	public static int AMS_MAX_INSTALL;
	/**限制安装设备的数量,为0时不限制 付费应用*/
	public static int AMS_INSTALL_DEVICE_MAX;
	/**限制一台设备安装的最大次数,为0时不限制 付费应用*/
	public static int AMS_ONE_DEVICE_MAX_INSTALL;
	
	/**AuthCode=0允许下载的最大次数 免费应用*/
	public static int AMS_MAX_DOWNlOAD_FREE = 1000;
	/**AuthCode=1允许安装的最大次数 免费应用*/
	public static int AMS_MAX_INSTALL_FREE = 1000;
	/**限制安装设备的数量,为0时不限制 免费应用*/
	public static int AMS_INSTALL_DEVICE_MAX_FREE = 1000;
	/**限制一台设备安装的最大次数,为0时不限制 免费应用*/
	public static int AMS_ONE_DEVICE_MAX_INSTALL_FREE = 1000;
	
	/**注册PSB服务失败重试时间*/
	public static int AMS_REGISTPSB_FAILER_REPEAT_TIME = 1;
	/**更新计数器缓存到数据库的间隔时间*/
	public static int AMS_PAGECOUNTER_CACHE_UPDATE_TIME;
	/**排行榜显示最大条数×*/
	public static int AMS_TOPlIST_MAX_SIZE;
	/**pushMsg消息格式*/
	public static String DATA_FORMAT = "yyyyMMddHHmmss";
	/**rss查询分类名称*/
	public static String AMS_TEXT_GAME;
	
	//#############init from ams properties file end
	
	/**获取用户昵称 doGet Url*/
	public static String AMS_USERCOMMENT_GETNICKNAME;
	
	/**用户下载App文件URL*/
	public static String AMS_DOWN_APPFILE;
	/**获取异步通知支付结果URL*/
	public static String AMS_PURCHASE_NOTIFY_PATH="/ams/1.0/getresultnotify.do";
	public static String AMS_PURCHASE_NOTIFY_PATHV3="/ams/3.0/getresultnotify.do";
	public static String AMS_PURCHASE_NOTIFYVALIDATE_PATH ="/lepay/gateway";//= "/billing/validateNotify.do";
	public static String AMS_PAYMODE_URL ="lepay.std.paymode.order";
	public static String AMS_PAYVERIFY_URL ="lepay.notify.std.verify";
	public static String AMS_PAY_SINGLEQUERY_URL ="lepay.order.std.query";
	/**显示应用程序详细信息相对URL*/
	public static String AMS_APPINFO_PATH;
	public static String AMS_APPINFO_PATH_LEPHONE_V2;//绝对URL
	public static String AMS_APPINFO_PATH_U1_V2;//绝对URL
	/**游戏应用RSS名称*/
	public static String AMS_RSSGAME_NAME;
	/**游戏应用RSS保存路径,相对本工程根目录*/
	public static String AMS_RSSGAME_SAVE_PATH;
	//Ams Error Code Value
	public static String MESSAGE_ERROR_CODE_001;
	public static String MESSAGE_ERROR_CODE_400;
	public static String MESSAGE_ERROR_CODE_401;
	public static String MESSAGE_ERROR_CODE_403;
	public static String MESSAGE_ERROR_CODE_404;
	public static String MESSAGE_ERROR_CODE_409;
	public static String MESSAGE_ERROR_CODE_500;
	public static String MESSAGE_ERROR_CODE_503;
	public static String MESSAGE_ERROR_CODE_UNKONWN;
	
	//页面缓存时间配置 lephone
	public static long UI_APPTYPELIST_CACHE_TIME ;
	public static long UI_APPLIST_CACHE_TIME ;
	public static long UI_APPGAMELIST_CACHE_TIME ;
	public static long UI_TOPLIST_CACHE_TIME ;
	public static long UI_RECOMMENDLIST_CACHE_TIME ;
	public static long UI_APPINFO_CACHE_TIME ;
	public static long UI_COMMENT_CACHE_TIME ;
	//页面缓存时间配置 U1
	public static long UONE_APPTYPELIST_CACHE_TIME ;
	public static long UONE_APPLIST_CACHE_TIME ;
	public static long UONE_APPGAMELIST_CACHE_TIME ;
	public static long UONE_TOPLIST_CACHE_TIME ;
	public static long UONE_RECOMMENDLIST_CACHE_TIME ;
	public static long UONE_APPINFO_CACHE_TIME ;
	public static long UONE_COMMENT_CACHE_TIME ;
	public static long UONE_APPMANAGE_CACHE_TIME ;
	public static long UONE_APPREVIEW_CACHE_TIME ;
	public static long UONE_APPSEARCH_CACHE_TIME ;
	public static long UONE_APPFAVORITE_CACHE_TIME ;
	public static long UONE_APPGETNEW_CACHE_TIME ;
	public static long UONE_APPPROMOTION_CACHE_TIME ;
	public static long UONE_APPPROMOTIONLIST_CACHE_TIME ;
	
	
	//COMMON_json
	public static long JSON_APPDATA_CACHE_TIME ;
	public static long JSON_APPDONWLOADLIST_CACHE_TIME ;
	public static long JSON_APPINFODATA_CACHE_TIME ;
	public static long JSON_APPSAMEVERSION_CACHE_TIME ;
	public static long JSON_APPSEARCHDATA_CACHE_TIME ;
	public static long JSON_APPTOPDATA_CACHE_TIME ;
	public static long JSON_APPTYPEDATA_CACHE_TIME ;
	public static long JSON_DOWNOTHERAPPS_CACHE_TIME ;
	public static long JSON_FAVORITEAPPLISTDATA_CACHE_TIME ;
	public static long JSON_GETNEWAPPDATA_CACHE_TIME ;
	public static long JSON_GETRECDATA_CACHE_TIME ;
	public static long JSON_PROMMOTIONDATA_CACHE_TIME ;
	public static long JSON_PROMOTIONAPPDATA_CACHE_TIME ;
	public static long JSON_REVIEWLIST_CACHE_TIME ;
	public static long JSON_REVIEWMANAGELIST_CACHE_TIME;
	public static long JSON_SNAPURILIST_CACHE_TIME ;
	/** 广告缓存时间 */
	public static long JSON_AD_CACHE_TIME;
	//json列表显示页数
	public static int JSON_APPDATA_PAGESIZE;
	public static int JSON_APPDONWLOADLIST_PAGESIZE;
	public static int JSON_APPSEARCHDATA_PAGESIZE;
	public static int JSON_APPTOPDATA_PAGESIZE ;
	public static int JSON_APPTYPEDATA_PAGESIZE;
	public static int JSON_FAVORITEAPPLISTDATA_PAGESIZE;
	public static int JSON_GETNEWAPPDATA_PAGESIZE;
	public static int JSON_GETRECDATA_PAGESIZE;
	public static int JSON_PROMMOTIONDATA_PAGESIZE;
	public static int JSON_PROMOTIONAPPDATA_PAGESIZE;
	public static int JSON_REVIEWLIST_PAGESIZE ;
	public static int JSON_REVIEWMANAGELIST_PAGESIZE;
	public static int JSON_UPDATEDATA_PAGESIZE ;
	

	/**应用下载付费*/
	public static Long AMS_PURCHASE_GOODSID=new Long(10001);
	public static String AMS_BILLING_PUBLICKEY;//  = "MIIBtzCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYQAAoGAfDd/LhHPQlrEsB4pL0Wb2aJ0W0Rtj5v9YALluNCzBJtxUfTmrA6qqxCooDylcanNHUEUJrHkPlqrmaoCQlJlNNpj357qLVQmRpBTCWeJZS6HGQOzm7olL8sPUTWYpnD+LQg3xyxx9TooxtPQhiTbDlEHc6/mRnEWgdv87aNjueo=";
	public static String AMS_LENOVO_PRIVATE_KEY;// = "MIIBSwIBADCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoEFgIUC6l4qEDo3J7jfOPdtBUeFN1Z0eY=";
	public static String AMS_LENOVO_PUBLIC_KEY;//  = "MIIBtzCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYQAAoGAfDd/LhHPQlrEsB4pL0Wb2aJ0W0Rtj5v9YALluNCzBJtxUfTmrA6qqxCooDylcanNHUEUJrHkPlqrmaoCQlJlNNpj357qLVQmRpBTCWeJZS6HGQOzm7olL8sPUTWYpnD+LQg3xyxx9TooxtPQhiTbDlEHc6/mRnEWgdv87aNjueo=";
	//public static String AMS_PAY_PUBLICKEY;
	//public static String AMS_PAY_PRIVATEKEY;
	public static final String TIP_APPNAME_EXIST = "应用名称已经存在";
	public static final String TIP_UPLOADFILE_ISNULL = "上传的内容不能为空";
	public static final String TIP_APP_UPLOAD_SUCCESS = "应用发布成功";
	public static final String TIP_APP_UNLOAD_SUCCESS = "应用下架成功";
	/**屏蔽评论关键字*/
	public static String SYS_KEYWORD_SHIELD;
	/**v2.5相关参数*/
	public static String REPORT_MAIL_TEMPLATE;
	public static boolean REPORT_MAIL_AUTH;
	public static String REPORT_MAIL_PASSWORD;
	public static String REPORT_MAIL_SMTPHOST;
	public static String REPORT_MAIL_USERNAME;
	public static String REPORT_MAIL_SERVICEEMAILADDRESS;
	public static String REPORT_MAIL_TITLE;
	public static String REPORT_MAIL_COPYTOADDRESS;
	public static String REPORT_MAIL_TO;
	public static String REPORT_MAIL_SOCKSPROXYHOST;
	public static String REPORT_MAIL_SOCKSPROXYPORT;
	public static boolean REPORT_MAIL_NEEDPROXY;
	/** lePhone json 每页显示条数 by Hanxiaoyong */
	public static int JSON_LEPHONE_PAGESIZE_V2_5;
	/*******获取用户名***/
	public static String AMS_GETUSERKEYINFO_URL;
	/***乐友主页地址**/
	public static String LEYOU_BASE_URL;
	/** 用户头像地址 */
	public static String LEYOU_FACE_URL;
	
	public static final String AMS_LEPHONE_PTN_V3 ="lps-ams-lephone-ptn-3.0";
	public static final String AMS_FILEMAN_V3_0 ="lps-ams-fileman-3.0";
	public static final String AMS_COMMON_V3_0 ="lps-ams-common-3.0";
	/**对单一联想应用商店账号对某一应用评论的限制次数 by huohezhang 2010-9-17*/
	public static int AMS_COMMENT_TIMES;
	/** 评论，评分，下载发消息通知，消息队列信息*/
	public static String APPSTORE_DOWNLOAD_QUEUE ="LPS.APPSTORE.DOWNLOAD";
	public static String APPSTORE_COMMENT_QUEUE="LPS.APPSTORE.COMMENT";
	public static String APPSTORE_GRADE_QUEUE="LPS.APPSTORE.GRADE";
	public static String APPSTORE_UPSHELL_QUEUE="LPS.APPSTORE.UPSHELL";
	public static String APPSTORE_PURCHASE_QUEUE="LPS.APPSTORE.PURCHASE";
	
	
	/**应用分享 email 主题、内容、url（web应用商店应用详情地址） */
	public static String AMS_APP_SHARE_EMAILTITLE;
	public static String AMS_APP_SHARE_EMAIL;
	
	/**应用分享sms 内容、url（moile应用商店应用详情页地址）*/
	public static String AMS_APP_SHARE_SMS;
	
	/**
	 * 短信支付时，设定的短信阈值，达到此比例时即为成功。
	 */
	public static float SMS_VALVE = 0.1f;
	/**
	 *阈值含义:V取值为V:表示金额,取值为C：表示条数  
	 */
	public static String VALVE_KEY = "V";
	/**
	 *单元测试标志
	 */
	public static String _UNIT_TEST_FLAG_ ;
	
	public SysInfoInit() throws LpsAmsException{
		initParam(AMS_COMMON_V3_0);
	}
	/**
	 * 初始化指定子系统
	 * @param initType
	 * @throws LpsAmsException
	 */
	public SysInfoInit(String initSysName) throws LpsAmsException{
		initParam(initSysName);
	}
	
	/**
	 * 初始化系统参数
	 * @throws LpsAmsException 
	 */
	@SuppressWarnings("unchecked")
	public void initParam(String initSysName) throws LpsAmsException{
		/*DaoFactory daoFactory = DaoFactory.getDaoFactory();
		AmsSysinfoDao sysInfoDao = daoFactory.getAmsSysinfoDao();
		AmsDao amsDao = daoFactory.getAmsDao();*/
		List<AmsSysinfo> sysInfo_list = new ArrayList();;
		Map<String,Object> keyObj = null;
		try{
			//sysInfo_list = sysInfoDao.getAmsSysinfoList();
			//keyObj = amsDao.findAmsAppSysInfo();
			StringBuffer sbSQL = new StringBuffer();
			sbSQL.append("select sysinfo_id,param_name,param_value,param_describe,param_lastmodify,param_type from ams_sysinfo");
			List list=jdbcT.queryForList(sbSQL.toString());
			int size=list.size();
			for(int i=0;i<size;i++) {
				AmsSysinfo t=new AmsSysinfo();
				Map m=(Map)list.get(i);
				t.setParam_describe((String)m.get("param_describe"));
				t.setParam_lastmodify((java.util.Date)m.get("param_lastmodify"));
				t.setParam_name((String)m.get("param_name"));
				t.setParam_type(new Long(m.get("param_type").toString()));
				t.setParam_value((String)m.get("param_value"));
				t.setSysinfo_id(new Long(m.get("sysinfo_id").toString()));
				sysInfo_list.add(t);
			}
			try {
			log.info("-------------------初始化屏蔽关键字开始！----------------------");
			sbSQL = new StringBuffer();
			sbSQL.append("select blob_value from ams_app_sys_info where group_type='SYS_KEYWORD_SHIELD' ");
			sbSQL.append("and VALUE_TYPE=2");
            jdbcT.query(sbSQL.toString(),
            		new AbstractLobStreamingResultSetExtractor(){
                    protected void streamData(ResultSet rs) throws SQLException,IOException,DataAccessException {
                	SYS_KEYWORD_SHIELD=new String(new OracleLobHandler().getBlobAsBytes(rs, 1));
                }
               }
            ); 
            }catch(Exception e) {
            	throw new LpsAmsException("屏蔽关键字失败！",e);
            }
            if(null==SYS_KEYWORD_SHIELD || "".equals(SYS_KEYWORD_SHIELD.trim()))
                throw new LpsAmsException("屏蔽关键字失败！无法获取屏蔽关键字或屏蔽关键字为空！");
		}finally{
			//sysInfoDao.closeSession();
		}
		log.info("SYS_KEYWORD_SHIELD value is : "+SYS_KEYWORD_SHIELD);
		
		log.info("-------------------【"+initSysName+"子系统】开始初始化常量！----------------------");
		if(sysInfo_list != null && !sysInfo_list.isEmpty()){
			log.info("########### Public Rcsource Set###############################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null)
				if(paramName.equals("AMS_FILE_SERVER")){
					AMS_FILE_SERVER = paramValue;
				}else if(paramName.equals("AMS_SERVERS_PUBLIC")){
					AMS_SERVERS_PUBLIC = paramValue;
				}else if(paramName.equals("AMS_USS_SERVER")){
					AMS_USS_SERVER = paramValue;
				}else if(paramName.equals("AMS_BILLING_SERVER")){
					AMS_BILLING_SERVER = paramValue;
				}else if(paramName.equals("AMS_PAY_SERVER")){
					AMS_PAY_SERVER = paramValue;
				}
			}
			log.info("AMS_FILE_SERVER value is : "+AMS_FILE_SERVER);
			log.info("AMS_SERVERS_PUBLIC value is : "+AMS_SERVERS_PUBLIC);
			log.info("AMS_USS_SERVER value is : "+AMS_USS_SERVER);
			log.info("AMS_BILLING_SERVER value is : "+AMS_BILLING_SERVER);
			log.info("AMS_PAY_SERVER value is : "+AMS_PAY_SERVER);
			
			log.info("########### Regist Service Set ###############################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null){
					paramValue = paramValue != null ? paramValue :"";
					if(paramName.equals("AMS_PSB_SERVICE_ADDRESS")){
						AMS_PSB_SERVICE_ADDRESS = AMS_SERVERS_PUBLIC+paramValue;
					}else if(paramName.equals("AMS_PSB_SERVICE_ALTERADDRESS")){
						AMS_PSB_SERVICE_ALTERADDRESS = AMS_SERVERS_PUBLIC+paramValue;
					}else if(paramName.equals("AMS_PSB_SERVICE_NOTIFY")){
						AMS_PSB_SERVICE_NOTIFY = AMS_SERVERS_PUBLIC+paramValue;
					}else if(paramName.equals("AMS_PSB_SERVICE_SET")){
						AMS_PSB_SERVICE_SET = AMS_SERVERS_PUBLIC+paramValue;
					}
				}
			}
			log.info("AMS_PSB_SERVICE_ADDRESS value is : "+AMS_PSB_SERVICE_ADDRESS);
			log.info("AMS_PSB_SERVICE_ALTERADDRESS value is : "+AMS_PSB_SERVICE_ALTERADDRESS);
			log.info("AMS_PSB_SERVICE_NOTIFY value is : "+AMS_PSB_SERVICE_NOTIFY);
			log.info("AMS_PSB_SERVICE_SET value is : "+AMS_PSB_SERVICE_SET);
			
			log.info("########### The 3rd Service Interface ########################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null)
				if(paramName.equals("AMS_USS_NICKNAME_PATH")){
					AMS_USS_NICKNAME_PATH = paramValue;
				}else if(paramName.equals("AMS_USS_NICKNAME_PATH_V2")){
					AMS_USS_NICKNAME_PATH_V2 = paramValue;
				}
				
			}
			log.info("AMS_USS_NICKNAME_PATH value is : "+AMS_USS_NICKNAME_PATH);
			log.info("AMS_USS_NICKNAME_PATH_V2 value is : "+AMS_USS_NICKNAME_PATH_V2);
			
			log.info("########### The search  Interface ########################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null)
				if(paramName.equals("AMS_SEARCH_URL"))
					AMS_SEARCH_URL = paramValue;
				if(paramName.equals("AMS_INDEXUPDATE_URL"))
					AMS_INDEXUPDATE_URL = paramValue;
				
			}
			log.info("AMS_SEARCH_URL value is : "+AMS_SEARCH_URL);
			log.info("AMS_INDEXUPDATE_URL value is : "+AMS_INDEXUPDATE_URL);
			
			log.info("########### The AMS Service Interface ########################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null)
				if(paramName.equals("AMS_DOWN_APPFILE_PATH_V3")){
					AMS_DOWN_APPFILE_PATH_V3 = paramValue;
				}else if(paramName.equals("AMS_USERCOMMENT_GETNICKNAME")){
					AMS_USERCOMMENT_GETNICKNAME = paramValue;
				}
			}
			log.info("AMS_DOWN_APPFILE_PATH_V3 value is : "+AMS_DOWN_APPFILE_PATH_V3);
			
			log.info("########### The 3rd Service Interface Full URL ###############");
			//AMS_USERCOMMENT_GETNICKNAME = AMS_USS_SERVER+AMS_USS_NICKNAME_PATH;
			log.info("AMS_USERCOMMENT_GETNICKNAME value is: "+AMS_USERCOMMENT_GETNICKNAME);
			
			log.info("########### The AMS Service Interface Full URL ################");
			log.info("AMS_DOWN_APPFILE value is : "+AMS_DOWN_APPFILE);
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null)
				if(paramName.equals("AMS_APPINFO_PATH")){
					AMS_APPINFO_PATH = paramValue;
				}else if(paramName.equals("AMS_APPINFO_PATH_LEPHONE_V2")){
					AMS_APPINFO_PATH_LEPHONE_V2 = paramValue;
				}else if(paramName.equals("AMS_APPINFO_PATH_U1_V2")){
					AMS_APPINFO_PATH_U1_V2 = paramValue;
				}else if(paramName.equals("AMS_RSSGAME_NAME")){
					AMS_RSSGAME_NAME = paramValue;
				}else if(paramName.equals("AMS_RSSGAME_SAVE_PATH")){
					AMS_RSSGAME_SAVE_PATH = paramValue;
				}
			}
			log.info("AMS_APPINFO_PATH value is : "+AMS_APPINFO_PATH);
			log.info("AMS_APPINFO_PATH_LEPHONE_V2 value is : "+AMS_APPINFO_PATH_LEPHONE_V2);
			log.info("AMS_APPINFO_PATH_U1_V2 value is : "+AMS_APPINFO_PATH_U1_V2);
			log.info("AMS_RSSGAME_NAME value is : "+AMS_RSSGAME_NAME);
			log.info("AMS_RSSGAME_SAVE_PATH value is : "+AMS_RSSGAME_SAVE_PATH);
			
			log.info("############## AMS App File Upload Path Set ##################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null){
					paramValue = paramValue != null ? paramValue :"";
					if(paramName.equals("AMS_APP_UPLOAD_ROOTPATH")){
						AMS_APP_UPLOAD_ROOTPATH = paramValue;
					}else if(paramName.equals("AMS_APP_DOWN_ROOTPATH")){
						AMS_APP_DOWN_ROOT_PATH = paramValue;
						AMS_APP_DOWN_ROOTPATH = AMS_FILE_SERVER+paramValue;
					}else if(paramName.equals("AMS_APP_UPLOAD_BG")){
						AMS_APP_UPLOAD_BG = paramValue;
					}else if(paramName.equals("AMS_APP_UPLOAD_SNAP")){
						AMS_APP_UPLOAD_SNAP = paramValue;
					}else if(paramName.equals("AMS_APP_UPLOAD_JAR")){
						AMS_APP_UPLOAD_JAR = paramValue;
					}else if(paramName.equals("AMS_APP_UPLOAD_ICON")){
						AMS_APP_UPLOAD_ICON = paramValue;
					}else if(paramName.equals("AMS_APP_FILECACHE")){
						AMS_APP_FILECACHE = paramValue;
					}else if(paramName.equals("AMS_COOKIE_MAXAGE")){
						AMS_COOKIE_MAXAGE = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_RECOMMEND_PMSGTTL")){
						AMS_RECOMMEND_PMSGTTL = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_LIST_PAGESIZE")){
						AMS_LIST_PAGESIZE = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_MAX_DOWNlOAD")){
						AMS_MAX_DOWNlOAD = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_MAX_INSTALL")){
						AMS_MAX_INSTALL = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_INSTALL_DEVICE_MAX")){
						AMS_INSTALL_DEVICE_MAX = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_ONE_DEVICE_MAX_INSTALL")){
						AMS_ONE_DEVICE_MAX_INSTALL = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_REGISTPSB_FAILER_REPEAT_TIME")){
						AMS_REGISTPSB_FAILER_REPEAT_TIME = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_PAGECOUNTER_CACHE_UPDATE_TIME")){
						AMS_PAGECOUNTER_CACHE_UPDATE_TIME = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_TOPlIST_MAX_SIZE")){
						AMS_TOPlIST_MAX_SIZE = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_TEXT_GAME")){
						AMS_TEXT_GAME = paramValue;
					}else if(paramName.equals("AMS_TOPlIST_MAX_SIZE")){
						AMS_TOPlIST_MAX_SIZE = Integer.parseInt(paramValue);
					}else if(paramName.equals("AMS_BILLING_PUBLICKEY")){
						AMS_BILLING_PUBLICKEY = paramValue;
					}else if(paramName.equals("AMS_LENOVO_PRIVATE_KEY")){
						AMS_LENOVO_PRIVATE_KEY = paramValue;
					}else if(paramName.equals("AMS_LENOVO_PUBLIC_KEY")){
						AMS_LENOVO_PUBLIC_KEY = paramValue;
					}else if(paramName.equals("AMS_COMMENT_TIMES")){//add by huohezhang 2010-9-19
						AMS_COMMENT_TIMES = Integer.parseInt(paramValue);
					}
				}
			}
			log.info("AMS_APP_UPLOAD_ROOTPATH value is : "+AMS_APP_UPLOAD_ROOTPATH);
			log.info("AMS_APP_DOWN_ROOTPATH value is : "+AMS_APP_DOWN_ROOTPATH);
			log.info("AMS_APP_UPLOAD_BG value is : "+AMS_APP_UPLOAD_BG);
			log.info("AMS_APP_UPLOAD_SNAP value is : "+AMS_APP_UPLOAD_SNAP);
			log.info("AMS_APP_UPLOAD_JAR value is : "+AMS_APP_UPLOAD_JAR);
			log.info("AMS_APP_UPLOAD_ICON value is : "+AMS_APP_UPLOAD_ICON);
			log.info("AMS_APP_FILECACHE value is : "+AMS_APP_FILECACHE);
			log.info("AMS_COOKIE_MAXAGE value is : "+AMS_COOKIE_MAXAGE);
			log.info("AMS_RECOMMEND_PMSGTTL value is : "+AMS_RECOMMEND_PMSGTTL);
			log.info("AMS_LIST_PAGESIZE value is : "+AMS_LIST_PAGESIZE);
			log.info("AMS_MAX_DOWNlOAD value is : "+AMS_MAX_DOWNlOAD);
			log.info("AMS_MAX_INSTALL value is : "+AMS_MAX_INSTALL);
			log.info("AMS_INSTALL_DEVICE_MAX value is : "+AMS_INSTALL_DEVICE_MAX);
			log.info("AMS_TOPlIST_MAX_SIZE value is : "+AMS_TOPlIST_MAX_SIZE);
			log.info("AMS_TEXT_GAME value is : "+AMS_TEXT_GAME);
			log.info("AMS_ONE_DEVICE_MAX_INSTALL value is : "+AMS_ONE_DEVICE_MAX_INSTALL);
			log.info("AMS_REGISTPSB_FAILER_REPEAT_TIME value is : "+AMS_REGISTPSB_FAILER_REPEAT_TIME);
			log.info("AMS_PAGECOUNTER_CACHE_UPDATE_TIME value is : "+AMS_PAGECOUNTER_CACHE_UPDATE_TIME);
			log.info("AMS_TOPlIST_MAX_SIZE value is : "+AMS_TOPlIST_MAX_SIZE);
			log.info("AMS_BILLING_PUBLICKEY value is : "+AMS_BILLING_PUBLICKEY);
			log.info("AMS_LENOVO_PRIVATE_KEY value is : "+AMS_LENOVO_PRIVATE_KEY);
			log.info("AMS_LENOVO_PUBLIC_KEY value is : "+AMS_LENOVO_PUBLIC_KEY);
			
			log.info("############## AMS App UI cache time Set ##################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				if(sysInfo.getParam_type() != null && sysInfo.getParam_type() == 5){
					String paramName = sysInfo.getParam_name();
					Long paramValue = Long.parseLong(sysInfo.getParam_value());
					if(paramName != null)
						if(paramName.equals("UI_APPTYPELIST_CACHE_TIME")){
							UI_APPTYPELIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UI_APPLIST_CACHE_TIME")){
							UI_APPLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UI_APPGAMELIST_CACHE_TIME")){
							UI_APPGAMELIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UI_TOPLIST_CACHE_TIME")){
							UI_TOPLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UI_RECOMMENDLIST_CACHE_TIME")){
							UI_RECOMMENDLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UI_APPINFO_CACHE_TIME")){
							UI_APPINFO_CACHE_TIME = paramValue;
						}else if(paramName.equals("UI_COMMENT_CACHE_TIME")){
							UI_COMMENT_CACHE_TIME = paramValue;
						}
				}
			}
			log.info("UI_APPTYPELIST_CACHE_TIME value is : "+UI_APPTYPELIST_CACHE_TIME);
			log.info("UI_APPLIST_CACHE_TIME value is : "+UI_APPLIST_CACHE_TIME);
			log.info("UI_APPGAMELIST_CACHE_TIME value is : "+UI_APPGAMELIST_CACHE_TIME);
			log.info("UI_TOPLIST_CACHE_TIME value is : "+UI_TOPLIST_CACHE_TIME);
			log.info("UI_RECOMMENDLIST_CACHE_TIME value is : "+UI_RECOMMENDLIST_CACHE_TIME);
			log.info("UI_APPINFO_CACHE_TIME value is : "+UI_APPINFO_CACHE_TIME);
			log.info("UI_COMMENT_CACHE_TIME value is : "+UI_COMMENT_CACHE_TIME);
			
			log.info("############## AMS App UONE cache time Set ##################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				if(sysInfo.getParam_type() != null && sysInfo.getParam_type() == 7){
					String paramName = sysInfo.getParam_name();
					Long paramValue = Long.parseLong(sysInfo.getParam_value());
					if(paramName != null)
						if(paramName.equals("UONE_APPTYPELIST_CACHE_TIME")){
							UONE_APPTYPELIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPLIST_CACHE_TIME")){
							UONE_APPLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPGAMELIST_CACHE_TIME")){
							UONE_APPGAMELIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_TOPLIST_CACHE_TIME")){
							UONE_TOPLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_RECOMMENDLIST_CACHE_TIME")){
							UONE_RECOMMENDLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPINFO_CACHE_TIME")){
							UONE_APPINFO_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_COMMENT_CACHE_TIME")){
							UONE_COMMENT_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPMANAGE_CACHE_TIME")){
							UONE_APPMANAGE_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPREVIEW_CACHE_TIME")){
							UONE_APPREVIEW_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPSEARCH_CACHE_TIME")){
							UONE_APPSEARCH_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPFAVORITE_CACHE_TIME")){
							UONE_APPFAVORITE_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPGETNEW_CACHE_TIME")){
							UONE_APPGETNEW_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPPROMOTION_CACHE_TIME")){
							UONE_APPPROMOTION_CACHE_TIME = paramValue;
						}else if(paramName.equals("UONE_APPPROMOTIONLIST_CACHE_TIME")){
							UONE_APPPROMOTIONLIST_CACHE_TIME = paramValue;
						}
				}
			}
			log.info("UONE_APPTYPELIST_CACHE_TIME value is : "+UONE_APPTYPELIST_CACHE_TIME);
			log.info("UONE_APPLIST_CACHE_TIME value is : "+UONE_APPLIST_CACHE_TIME);
			log.info("UONE_APPGAMELIST_CACHE_TIME value is : "+UONE_APPGAMELIST_CACHE_TIME);
			log.info("UONE_TOPLIST_CACHE_TIME value is : "+UONE_TOPLIST_CACHE_TIME);
			log.info("UONE_RECOMMENDLIST_CACHE_TIME value is : "+UONE_RECOMMENDLIST_CACHE_TIME);
			log.info("UONE_APPINFO_CACHE_TIME value is : "+UONE_APPINFO_CACHE_TIME);
			log.info("UONE_COMMENT_CACHE_TIME value is : "+UONE_COMMENT_CACHE_TIME);
			log.info("UONE_APPMANAGE_CACHE_TIME value is : "+UONE_APPMANAGE_CACHE_TIME);
			log.info("UONE_APPREVIEW_CACHE_TIME value is : "+UONE_APPREVIEW_CACHE_TIME);
			log.info("UONE_APPSEARCH_CACHE_TIME value is : "+UONE_APPSEARCH_CACHE_TIME);
			log.info("UONE_APPFAVORITE_CACHE_TIME value is : "+UONE_APPFAVORITE_CACHE_TIME);
			log.info("UONE_APPGETNEW_CACHE_TIME value is : "+UONE_APPGETNEW_CACHE_TIME);
			log.info("UONE_APPPROMOTION_CACHE_TIME value is : "+UONE_APPPROMOTION_CACHE_TIME);
			log.info("UONE_APPPROMOTIONLIST_CACHE_TIME value is : "+UONE_APPPROMOTIONLIST_CACHE_TIME);
			
			
			log.info("############## AMS App JSON cache time Set ##################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				if(sysInfo.getParam_type() != null && sysInfo.getParam_type() == 7){
					String paramName = sysInfo.getParam_name();
					Long paramValue = Long.parseLong(sysInfo.getParam_value());
					if(paramName != null)
						if(paramName.equals("JSON_APPDATA_CACHE_TIME")){
							JSON_APPDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_APPDONWLOADLIST_CACHE_TIME")){
							JSON_APPDONWLOADLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_APPINFODATA_CACHE_TIME")){
							JSON_APPINFODATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_APPSAMEVERSION_CACHE_TIME")){
							JSON_APPSAMEVERSION_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_APPSEARCHDATA_CACHE_TIME")){
							JSON_APPSEARCHDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_APPTOPDATA_CACHE_TIME")){
							JSON_APPTOPDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_APPTYPEDATA_CACHE_TIME")){
							JSON_APPTYPEDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_DOWNOTHERAPPS_CACHE_TIME")){
							JSON_DOWNOTHERAPPS_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_FAVORITEAPPLISTDATA_CACHE_TIME")){
							JSON_FAVORITEAPPLISTDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_GETNEWAPPDATA_CACHE_TIME")){
							JSON_GETNEWAPPDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_GETRECDATA_CACHE_TIME")){
							JSON_GETRECDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_PROMMOTIONDATA_CACHE_TIME")){
							JSON_PROMMOTIONDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_PROMOTIONAPPDATA_CACHE_TIME")){
							JSON_PROMOTIONAPPDATA_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_REVIEWLIST_CACHE_TIME")){
							JSON_REVIEWLIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_REVIEWMANAGELIST_CACHE_TIME")){
							JSON_REVIEWMANAGELIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_SNAPURILIST_CACHE_TIME")){
							JSON_SNAPURILIST_CACHE_TIME = paramValue;
						}else if(paramName.equals("JSON_AD_CACHE_TIME")){
							JSON_AD_CACHE_TIME = paramValue;
						}
				}
			}
			log.info("JSON_APPDATA_CACHE_TIME value is : "+JSON_APPDATA_CACHE_TIME);
			log.info("JSON_APPDONWLOADLIST_CACHE_TIME value is : "+JSON_APPDONWLOADLIST_CACHE_TIME);
			log.info("JSON_APPINFODATA_CACHE_TIME value is : "+JSON_APPINFODATA_CACHE_TIME);
			log.info("JSON_APPSAMEVERSION_CACHE_TIME value is : "+JSON_APPSAMEVERSION_CACHE_TIME);
			log.info("JSON_APPSEARCHDATA_CACHE_TIME value is : "+JSON_APPSEARCHDATA_CACHE_TIME);
			log.info("JSON_APPTOPDATA_CACHE_TIME value is : "+JSON_APPTOPDATA_CACHE_TIME);
			log.info("JSON_APPTYPEDATA_CACHE_TIME value is : "+JSON_APPTYPEDATA_CACHE_TIME);
			log.info("JSON_DOWNOTHERAPPS_CACHE_TIME value is : "+JSON_DOWNOTHERAPPS_CACHE_TIME);
			log.info("JSON_FAVORITEAPPLISTDATA_CACHE_TIME value is : "+JSON_FAVORITEAPPLISTDATA_CACHE_TIME);
			log.info("JSON_GETNEWAPPDATA_CACHE_TIME value is : "+JSON_GETNEWAPPDATA_CACHE_TIME);
			log.info("JSON_GETRECDATA_CACHE_TIME value is : "+JSON_GETRECDATA_CACHE_TIME);
			log.info("JSON_PROMMOTIONDATA_CACHE_TIME value is : "+JSON_PROMMOTIONDATA_CACHE_TIME);
			log.info("JSON_PROMOTIONAPPDATA_CACHE_TIME value is : "+JSON_PROMOTIONAPPDATA_CACHE_TIME);
			log.info("JSON_REVIEWLIST_CACHE_TIME value is : "+JSON_REVIEWLIST_CACHE_TIME);
			log.info("JSON_REVIEWMANAGELIST_CACHE_TIME value is : "+JSON_REVIEWMANAGELIST_CACHE_TIME);
			log.info("JSON_SNAPURILIST_CACHE_TIME value is : "+JSON_SNAPURILIST_CACHE_TIME);
			log.info("JSON_AD_CACHE_TIME value is : "+JSON_AD_CACHE_TIME);
			
			log.info("############## AMS App JSON page size Set ##################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				if(sysInfo.getParam_type() != null && sysInfo.getParam_type() == 8){
					String paramName = sysInfo.getParam_name();
					int paramValue = Integer.parseInt(sysInfo.getParam_value());
					if(paramName != null)
						if(paramName.equals("JSON_APPDATA_PAGESIZE")){
							JSON_APPDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_APPDONWLOADLIST_PAGESIZE")){
							JSON_APPDONWLOADLIST_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_APPSEARCHDATA_PAGESIZE")){
							JSON_APPSEARCHDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_APPTOPDATA_PAGESIZE")){
							JSON_APPTOPDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_APPTYPEDATA_PAGESIZE")){
							JSON_APPTYPEDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_FAVORITEAPPLISTDATA_PAGESIZE")){
							JSON_FAVORITEAPPLISTDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_GETNEWAPPDATA_PAGESIZE")){
							JSON_GETNEWAPPDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_GETRECDATA_PAGESIZE")){
							JSON_GETRECDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_PROMMOTIONDATA_PAGESIZE")){
							JSON_PROMMOTIONDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_PROMOTIONAPPDATA_PAGESIZE")){
							JSON_PROMOTIONAPPDATA_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_REVIEWLIST_PAGESIZE")){
							JSON_REVIEWLIST_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_REVIEWMANAGELIST_PAGESIZE")){
							JSON_REVIEWMANAGELIST_PAGESIZE = paramValue;
						}else if(paramName.equals("JSON_UPDATEDATA_PAGESIZE")){
							JSON_UPDATEDATA_PAGESIZE = paramValue;
						}
				}
			}
			log.info("JSON_APPDATA_PAGESIZE value is : "+JSON_APPDATA_PAGESIZE);
			log.info("JSON_APPDONWLOADLIST_PAGESIZE value is : "+JSON_APPDONWLOADLIST_PAGESIZE);
			log.info("JSON_APPSEARCHDATA_PAGESIZE value is : "+JSON_APPSEARCHDATA_PAGESIZE);
			log.info("JSON_APPTOPDATA_PAGESIZE value is : "+JSON_APPTOPDATA_PAGESIZE);
			log.info("JSON_APPTYPEDATA_PAGESIZE value is : "+JSON_APPTYPEDATA_PAGESIZE);
			log.info("JSON_FAVORITEAPPLISTDATA_PAGESIZE value is : "+JSON_FAVORITEAPPLISTDATA_PAGESIZE);
			log.info("JSON_GETNEWAPPDATA_PAGESIZE value is : "+JSON_GETNEWAPPDATA_PAGESIZE);
			log.info("JSON_GETRECDATA_PAGESIZE value is : "+JSON_GETRECDATA_PAGESIZE);
			log.info("JSON_PROMMOTIONDATA_PAGESIZE value is : "+JSON_PROMMOTIONDATA_PAGESIZE);
			log.info("JSON_PROMOTIONAPPDATA_PAGESIZE value is : "+JSON_PROMOTIONAPPDATA_PAGESIZE);
			log.info("JSON_REVIEWLIST_PAGESIZE value is : "+JSON_REVIEWLIST_PAGESIZE);
			log.info("JSON_REVIEWMANAGELIST_PAGESIZE value is : "+JSON_REVIEWMANAGELIST_PAGESIZE);
			log.info("JSON_UPDATEDATA_PAGESIZE value is : "+JSON_UPDATEDATA_PAGESIZE);
			
			log.info("-------------------初始化屏蔽关键字开始！----------------------");
			/*try {
				if(keyObj != null && !keyObj.isEmpty()){
					oracle.sql.BLOB blobValue = (oracle.sql.BLOB)keyObj.get("blob_value");
					SYS_KEYWORD_SHIELD = AmsUtil.blob2String(blobValue);
				}else{
					throw new LpsAmsException("屏蔽关键字失败！无法获取屏蔽关键字或屏蔽关键字为空！");
				}
			} catch (Exception e) {
				throw new LpsAmsException("屏蔽关键字失败！",e);
			}*/
			log.info("SYS_KEYWORD_SHIELD value is : "+SYS_KEYWORD_SHIELD);
			log.info("-------------------初始化屏蔽关键字结束！----------------------");
			
			log.info("-------------------初始化v2.5新增参数开始！----------------------");
			for(AmsSysinfo sysInfo : sysInfo_list){
				if(sysInfo.getParam_type() != null && sysInfo.getParam_type() == 10){
					String paramName = sysInfo.getParam_name();
					String paramValue = sysInfo.getParam_value();
					if(paramName != null)
						if(paramName.equals("REPORT_MAIL_TEMPLATE")){
							REPORT_MAIL_TEMPLATE = paramValue;
						}else if(paramName.equals("REPORT_MAIL_AUTH")){
							REPORT_MAIL_AUTH = Boolean.parseBoolean(paramValue);
						}else if(paramName.equals("REPORT_MAIL_PASSWORD")){
							REPORT_MAIL_PASSWORD = paramValue;
						}else if(paramName.equals("REPORT_MAIL_SMTPHOST")){
							REPORT_MAIL_SMTPHOST = paramValue;
						}else if(paramName.equals("REPORT_MAIL_USERNAME")){
							REPORT_MAIL_USERNAME = paramValue;
						}else if(paramName.equals("REPORT_MAIL_SERVICEEMAILADDRESS")){
							REPORT_MAIL_SERVICEEMAILADDRESS = paramValue;
						}else if(paramName.equals("REPORT_MAIL_TITLE")){
							REPORT_MAIL_TITLE = paramValue;
						}else if(paramName.equals("REPORT_MAIL_COPYTOADDRESS")){
							REPORT_MAIL_COPYTOADDRESS = paramValue;
						}else if(paramName.equals("REPORT_MAIL_TO")){
							REPORT_MAIL_TO = paramValue;
						}else if(paramName.equals("REPORT_MAIL_SOCKSPROXYHOST")){
							REPORT_MAIL_SOCKSPROXYHOST = paramValue;
						}else if(paramName.equals("REPORT_MAIL_SOCKSPROXYPORT")){
							REPORT_MAIL_SOCKSPROXYPORT = paramValue;
						}else if(paramName.equals("REPORT_MAIL_NEEDPROXY")){
							REPORT_MAIL_NEEDPROXY = Boolean.parseBoolean(paramValue);
						}else if(paramName.equals("JSON_LEPHONE_PAGESIZE_V2_5")){
							JSON_LEPHONE_PAGESIZE_V2_5 = Integer.valueOf(paramValue);
						}else if(paramName.equals("AMS_GETUSERKEYINFO_URL")){
							AMS_GETUSERKEYINFO_URL = paramValue;
						}else if(paramName.equals("LEYOU_BASE_URL")){
							LEYOU_BASE_URL = paramValue;
						}else if(paramName.equals("AMS_APP_SHARE_EMAIL")){
							AMS_APP_SHARE_EMAIL = paramValue;
						}else if(paramName.equals("AMS_APP_SHARE_EMAILTITLE")) {
							AMS_APP_SHARE_EMAILTITLE = paramValue;
						}else if(paramName.equals("AMS_APP_SHARE_SMS")) {
							AMS_APP_SHARE_SMS = paramValue;
						}else if(paramName.equals("LEYOU_FACE_URL")){
							LEYOU_FACE_URL = paramValue;
						}else if(paramName.equals("SMS_VALVE")){
							SMS_VALVE = Float.parseFloat(paramValue);
						}else if(paramName.equals("VALVE_KEY")){
							VALVE_KEY = paramValue;
						}
						
				}
			}
			log.info("REPORT_MAIL_TEMPLATE value is : "+REPORT_MAIL_TEMPLATE);
			log.info("REPORT_MAIL_AUTH value is : "+REPORT_MAIL_AUTH);
			log.info("REPORT_MAIL_PASSWORD value is : "+REPORT_MAIL_PASSWORD);
			log.info("REPORT_MAIL_SMTPHOST value is : "+REPORT_MAIL_SMTPHOST);
			log.info("REPORT_MAIL_USERNAME value is : "+REPORT_MAIL_USERNAME);
			log.info("REPORT_MAIL_SERVICEEMAILADDRESS value is : "+REPORT_MAIL_SERVICEEMAILADDRESS);
			log.info("REPORT_MAIL_TITLE value is : "+REPORT_MAIL_TITLE);
			log.info("REPORT_MAIL_COPYTOADDRESS value is : "+REPORT_MAIL_COPYTOADDRESS);
			log.info("REPORT_MAIL_TO value is : "+REPORT_MAIL_TO);
			log.info("REPORT_MAIL_SOCKSPROXYHOST value is : "+REPORT_MAIL_SOCKSPROXYHOST);
			log.info("REPORT_MAIL_SOCKSPROXYPORT value is : "+REPORT_MAIL_SOCKSPROXYPORT);
			log.info("REPORT_MAIL_NEEDPROXY value is : "+REPORT_MAIL_NEEDPROXY);
			log.info("JSON_LEPHONE_PAGESIZE_V2_5 value is : "+JSON_LEPHONE_PAGESIZE_V2_5);
			log.info("AMS_GETUSERKEYINFO_URL value is : "+AMS_GETUSERKEYINFO_URL);
			log.info("LEYOU_BASE_URL value is : "+LEYOU_BASE_URL);
			log.info("LEYOU_FACE_URL value is : "+LEYOU_FACE_URL);
			log.info("SMS_VALVE value is : "+String.valueOf(SMS_VALVE));
			log.info("VALVE_KEY value is : "+VALVE_KEY);
			log.info("-------------------初始化v2.5新增参数结束！----------------------");
			
			log.info("-------------------初始化自定义资源信息开始:----------------------");
			
			log.info("##############  Ams Sys Msg #########################");
			for(AmsSysinfo sysInfo : sysInfo_list){
				String paramName = sysInfo.getParam_name();
				String paramValue = sysInfo.getParam_value();
				if(paramName != null)
					if(paramName.equals(SysMessage.AMS_001)){
						MESSAGE_ERROR_CODE_001 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_400)){
						MESSAGE_ERROR_CODE_400 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_401)){
						MESSAGE_ERROR_CODE_401 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_403)){
						MESSAGE_ERROR_CODE_403 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_404)){
						MESSAGE_ERROR_CODE_404 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_409)){
						MESSAGE_ERROR_CODE_409 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_500)){
						MESSAGE_ERROR_CODE_500 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_503)){
						MESSAGE_ERROR_CODE_503 = paramValue;
					}else if(paramName.equals(SysMessage.AMS_999)){
						MESSAGE_ERROR_CODE_UNKONWN = paramValue;
					}
			}
			log.info("MESSAGE_ERROR_CODE_001 value is : "+MESSAGE_ERROR_CODE_001);
			log.info("MESSAGE_ERROR_CODE_400 value is : "+MESSAGE_ERROR_CODE_400);
			log.info("MESSAGE_ERROR_CODE_401 value is : "+MESSAGE_ERROR_CODE_401);
			log.info("MESSAGE_ERROR_CODE_403 value is : "+MESSAGE_ERROR_CODE_403);
			log.info("MESSAGE_ERROR_CODE_404 value is : "+MESSAGE_ERROR_CODE_404);
			log.info("MESSAGE_ERROR_CODE_409 value is : "+MESSAGE_ERROR_CODE_409);
			log.info("MESSAGE_ERROR_CODE_500 value is : "+MESSAGE_ERROR_CODE_500);
			log.info("MESSAGE_ERROR_CODE_503 value is : "+MESSAGE_ERROR_CODE_503);
			log.info("MESSAGE_ERROR_CODE_UNKONWN value is : "+MESSAGE_ERROR_CODE_UNKONWN);
			log.info("-------------------初始化自定义资源信息结束!----------------------");
		}else{
			throw new LpsAmsException("【"+initSysName+"子系统】初始化常量失败！");
		}
		log.info("-------------------【"+initSysName+"子系统】开始初始化自定义资源信息完毕！----------------------");
		log.info("-------------------【"+initSysName+"子系统】初始化设备信息缓存开始！----------------------");
		
		/**初始化消息队列信息*/
		initQueueInfo(jdbcT);
		/**初始化消息队列信息 end*/
		log.info("-------------------【"+initSysName+"子系统】初始化设备信息缓存完毕！----------------------");
		log.info("-------------------【"+initSysName+"子系统】初始化常量完毕！----------------------");
		
		/**加载单元测试标志*/
		File f=new File("test");
		if(f.exists()) {
			System.setProperty("_unit_test_flag_", "1");
			_UNIT_TEST_FLAG_="1";
			log.info("-------------------【"+initSysName+"子系统】以单元测试模式运行,如为产线运行环境，则此配置错误，请删除CLASSPATH下test目录！----------------------");
		}
	}
}
